<template>
  <div class="footer_container">
    <div class="allCheck_box">
      <input type="checkbox" id="allCheck" :checked="state" @change="getState"/>
      <label for="allCheck">全选</label>
    </div>
    <div class="totalPrice_box">
      <span>合计:</span>
      <span class="total_price">￥{{ totalPrice }}</span>
    </div>
    <button class="js_btn">结算({{ amount }})</button>
  </div>
</template>
<script>
export default {
  props: {
    id: {
      type: Number,
    },
    totalPrice: {
      type: Number,
      default: 0,
    },
    amount: {
      type: Number,
      default: 0,
    },
    state: {
      type: Boolean,
    },
  },
  methods:{
    getState(e){
      this.$emit('isFull',e.target.checked)
    }
  }
};
</script>
<style lang="less">
.footer_container {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: 1px solid #3333;
  .allCheck_box {
    display: flex;
    align-items: center;
    font-size: 14px;
    #allCheck {
      margin-right: 10px;
    }
  }
  .totalPrice_box {
    font-size: 14px;
    .total_price {
      color: red;
    }
  }
  .js_btn {
    width: 100px;
    height: 40px;
    border-radius: 20px;
    background-color: #005af9;
    color: white;
    border: 0;
  }
}
</style>